<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<script type="text/javascript">
		$(function() {
			$("#employe_submit").linkbutton({
				onClick : function() {
					$("#employ_form").form({
						url : "submit_employs",
						onSubmit : function(params) {
							params.pk = 'employ_act';
						},
						success : function(data) {
							if (data) {
								$("#employ_form").form("clear");
								//获取选中的面板
								var tab = $('#tt').tabs('getSelected');
								//根据选中的面板获取该面板的索引
								var index = $('#tt').tabs('getTabIndex',tab);
								//根据索引关闭
								if(index != 0){
									$('#tt').tabs('close',index);
								}
							}
							$.messager.alert("消息",data ? "提交成功！" : "提交失败！");
						}
					});
					var submit = $("#employ_form").form('enableValidation').form('validate');
					if (submit) {
						$.messager.confirm('消息', '您确定上传该流程吗？上传后无法修改！', function(r){
							if (r) {
								$("#employ_form").submit();
							}
						})
					}
				}
			});

			$("#employe_reset").linkbutton({
				onClick : function() {
					$("#employ_form").form('reset');
				}
			});
			$("#employe_save").linkbutton({
				onClick : function() {
					$("#employ_form").form({
						url : "save_employs",
						success : function(data) {
							if (data) {
								$("#employ_form").form("clear");
								//获取选中的面板
								var tab = $('#tt').tabs('getSelected');
								//根据选中的面板获取该面板的索引
								var index = $('#tt').tabs('getTabIndex',tab);
								//根据索引关闭
								if(index != 0){
									$('#tt').tabs('close',index);
								}
							}
							$.messager.alert("消息",data? "保存成功！" : "保存失败！");
						}
					});
					var submit = $("#employ_form").form('enableValidation').form('validate');
					if (submit) {
						$.messager.confirm('消息', '您确定上传该流程吗？上传后无法修改！', function(r){
							if (r) {
								$("#employ_form").submit();
							}
						})
					}
				}
			});

			$('#combobox_position').combobox({
				editable : false,
				labelAlign : 'right',
				label : '录用职位：',
				valueField : 'positionId',
				textField : 'positionName'
			});
			$('#combobox_dept').combobox({
				editable : false,
				labelAlign : 'right',
				label : '录用部门：',
				url : 'combobox_dept',
				valueField : 'deptId',
				textField : 'deptName',
				onSelect: function(dept){    
			        var url = 'combobox_position?deptId='+dept.deptId;    
			        $('#combobox_position').combobox('reload', url);    
			}
			});
		})
	</script>
	<div class="easyui-layout" fit="true" >
		<div data-options="region:'center'" align="center" style="border: none;">
			<form id="employ_form" method="post">
				<table class="table " style="margin: 10px; width: 70%" border="0"
					cellpadding="0" cellspacing="0">
					<thead>
						<tr align="center">
							<th colspan="5" style="font-size: 17px">人员录用审批表</th>
						</tr>
					</thead>
					<tbody>
						<tr align="left">
							<td colspan="5" style="font-size: 15px">人员信息</td>
						</tr>
						<tr>
							<td>
								<!-- employs_name 录用人姓名 -->
								<input name="employName" class="easyui-textbox" labelAlign='right'
									required style="width: 30%" label="姓名："
									data-options="validType:'length[0,10]'">
								<!-- employs_sex 录用人姓别 -->
								<select labelAlign='right' name="employSex" id=""
									class="easyui-combobox" style="width: 30%;" label="性别："
									editable="false">
									<option value="1">男</option>
									<option value="0">女</option>
								</select>
								<!--employ_birth 录用人出生日期  -->
								<input name="employBirth" class="easyui-datebox" required
									labelAlign='right' style="width: 30%;" label="出生年月：" editable="false"></input>
							</td>
						</tr>
						<tr>
							<td>
								<!--employ_school 毕业学校  -->
								<input name="employSchool" class="easyui-textbox" labelAlign='right'
									style="width: 30%" label="毕业学校：" validType="length[0,20]">
								<!--employ_major 专业  -->
								<input labelAlign='right' name="employMajor" class="easyui-textbox"
									style="width: 30%" label="专业：" validType="length[0,30]">
								<!--employ_education 学历  -->
								<select name="employEducation" labelAlign='right'
									class="easyui-combobox" name="sex" style="width: 30%;" label="学历："
									editable="false">
									<option value="高中">高中</option>
									<option value="专科">专科</option>
									<option value="本科">本科</option>
									<option value="硕士研究生">硕士研究生</option>
									<option value="博士研究生">博士研究生</option>
								</select>
							</td>
						</tr>
						<tr>
							<td>
								<!--employ_graduatetime 毕业时间  -->
								<input name="employGraduatetime" class="easyui-datebox"
									labelAlign='right' required style="width: 30%;" label="毕业时间："
									editable="false">
								<!--employ_residence 户口  -->
								<input name="employResidence" class="easyui-textbox" labelAlign='right'
									style="width: 30%" label="户口：" validType="length[0,100]">
								<!--employ_native 籍贯  -->
								<input labelAlign='right' name="employNative" class="easyui-textbox"
									style="width: 30%" label="籍贯：" validType="length[0,10]">
							</td>
						</tr>
						<tr>
							<td>
								<!--employ_marriage 婚否  -->
								<select name="employMarriage" class="easyui-combobox"
									style="width: 30%;" label="婚否：" labelAlign='right' editable="false">
									<option value="1">已婚</option>
									<option value="0">未婚</option>
								</select>
								<!--employ_nature 录用性质  -->
								<select name="employNature" class="easyui-combobox" style="width: 40%;"
									label="人员录用性质：" labelWidth='150px' labelAlign='right' editable="false">
									<option value="应届毕业生">应届毕业生</option>
									<option value="工作经验者">工作经验者</option>
									<option value="人才引进">人才引进</option>
								</select>
							</td>
						</tr>
						<tr align="left">
							<td colspan="5" style="font-size: 15px">劳动合同</td>
						</tr>
						<tr>
							<td>
								<!--employ_dept 录用部门   -->
								<input id="combobox_dept" name="deptId" style="width: 30%;">
								<!--employ_position 录用职位  -->
								<input id="combobox_position" name="positionId" style="width: 30%;">
								<!--employ_contractyears 合同年限  -->
								<input name="employContractyears" class="easyui-numberspinner"
									style="width: 30%;" labelAlign='right' required
									data-options="min:0,max:10,editable:false" label="合同年限：">
							</td>
						</tr>
						<tr>
							<td>
								<!--employ_posttime 到岗时间  -->
								<input name="employPosttime" class="easyui-datebox" labelAlign='right'
									required style="width: 30%;" label="到岗时间：" editable="false">
								<!--employ_probationary 试用期限  -->
								<input name="employProbationary" class="easyui-numberspinner"
									style="width: 30%;" labelAlign='right' required
									data-options="min:1,max:12,editable:false" label="试用期限（月）："
									labelWidth='120px'>
								<!--employ_salary 试用薪资  -->
								<input name="employSalary" class="easyui-numberspinner"
									style="width: 30%;" labelAlign='right' required
									data-options="min:0,increment:100" label="试用薪资：">
								<!--  -->
							</td>
						</tr>
						<tr>
							<td>
								<select name="employContracttype" class="easyui-combobox"
									style="width: 80%;" label="合同类型：" labelAlign='right' editable="false">
									<option value="有固定期限劳动合同">有固定期限劳动合同</option>
									<option value="无固定期限劳动合同">无固定期限劳动合同</option>
									<option value="以完成一定工作任务为期限的劳动合同">以完成一定工作任务为期限的劳动合同</option>
									<option value="其他劳动合同">其他劳动合同</option>
								</select>
							</td>
						</tr>
						<tr>
							<td style="text-align: center;">
								<a id="employe_save" class="easyui-linkbutton"
									data-options="iconCls:'icon-save',text:'暂存'"></a>
								<a id="employe_submit" class="easyui-linkbutton"
									data-options="iconCls:'icon-submit',text:'提交'"></a>
								<a id="employe_reset" class="easyui-linkbutton"
									data-options="iconCls:'icon-reload',text:'重置'"></a>
							</td>
						</tr>
					</tbody>

				</table>
			</form>
		</div>
		<!-- <div class="employs_form" data-options="region:'east',title:''"
			style="width: 300px"></div> -->
	</div>
</body>
</html>